/*!
* @preserve Palmoto Bloks
* http://www.palmoto.com
* Copyright (c) 2013 Andrew Richardson
* MIT License http://opensource.org/licenses/mit-license.php
*/
(function(n, t)
{
    function r(n)
    {
        for (var i = document.getElementsByTagName("script"), t = 0; t < i.length; t++)
            if (index = i[t].src.indexOf(n), index != -1)
                return i[t].src.split(n)[0];
        return null
    }
    function u(i, r)
    {
        var u = document.createElement("script"),
            f;
        u.type = "text/javascript",
        u.onload ? u.onload = function()
        {
            r && r()
        } : f = setInterval(function()
        {
            n[t] && (clearInterval(f), r && r())
        }, 50),
        u.src = i,
        document.getElementsByTagName("head")[0].appendChild(u)
    }
    function i()
    {
        var r = "palmoto-bee",
            i = n[t],
            u = {StartUpCommand: function()
                {
                    i.M._.object.clobber(this, {onRegister: function()
                        {
                            var n = new i.C.ShellController;
                            n.configure({
                                name: r, facade: this._facade
                            })
                        }})
                }},
            f;
        i.C._.init(u),
        f = new i.C.Facade,
        f.startUp(new u.StartUpCommand, r)
    }
    n[t] ? i() : u(r("palmoto-bee.js") + "palmoto-bloks.js", i)
})(this, "palmoto")
